package java8_11;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class GetMax {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double[] s = new double[6];

        System.out.println("请输入" + s.length + "个成绩：");
        for (int i = 0; i < s.length; i++) {
            s[i] = in.nextDouble();
        }
        double max = s[0];
        for (int i = 1; i < s.length; i++) {
            if (s[i] > max) {
                max = s[i];
            }
        }
//        double max = 0;
//        //找最大
//        //if(s[0]>max) max=s[0];if(s[1]>max) max=s[1];
//        for (int i = 0; i < s.length; i++) {
//            if (s[i] > max) {
//                max = s[i];
//            }
//        }
        System.out.println("最大的是：" + max);
    }
}
